home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
19
/
madtrb11.zip
/
INTR.INC
< prev
next >
Wrap
Text File
|
1985-08-05
|
2KB
|
81 lines
{INTR.INC}
{
These routines use some of the MS-DOS/PC-DOS interrupts
to increase the flexibility of Turbo Pascal. Included
are routines to read the system time and date, and to
control the cursor size.
Source: "INTRoducing The INTR Procedure", TUG Lines Volume I Issue 5
Author: Marshall Brain/Brain Software Systems
Application: IBM PC (and true compatibles)
}
procedure gettime(var hours,minutes,seconds:byte);
var
result : record
ax,bx,cx,dx,bp,si,di,ds,es,flags : integer;
end;
begin
result.ax:=$2c00;
intr($21,result);
hours:=hi(result.cx);
minutes:=lo(result.cx);
seconds:=hi(result.dx);
end;
procedure getdate(var month,day:byte; var year:integer);
var
result : record
ax,bx,cx,dx,bp,si,di,ds,es,flags : integer;
end;
begin
result.ax:=$2a00;
intr($21,result);
month:=hi(result.dx);
day:=lo(result.dx);
year:=result.cx;
end;
procedure cursoff;
var
result : record
ax,bx,cx,dx,bp,si,di,ds,es,flags : integer;
end;
begin
if mem[$0000:$0449] = 7 then
result.cx:=$4000
else
result.cx:=$2000;
result.ax:=$0100;
intr($10,result);
end;
procedure cursnorm;
var
result : record
ax,bx,cx,dx,bp,si,di,ds,es,flags : integer;
end;
begin
if mem[$0000:$0449] = 7 then
result.cx:=$0b0c
else
result.cx:=$0707;
result.ax:=$0100;
intr($10,result);
end;
procedure curson;
var
result : record
ax,bx,cx,dx,bp,si,di,ds,es,flags : integer;
end;
begin
if mem[$0000:$0449] = 7 then
result.cx:=$000d
else
result.cx:=$0007;
result.ax:=$0100;
intr($10,result);
end;